﻿''' <summary>
''' This class offers a way to call all member methods of a list
''' of writers with a single method call.
''' </summary>
''' <remarks></remarks>
Public Class WritersHelper

    Public Shared Sub Startup(ByVal cfgFile As String, ByVal writers As List(Of IWriter))
        For Each writer As IWriter In writers
            writer.Startup(cfgFile)
        Next
    End Sub

    Public Shared Sub WriteTitle(ByVal str As String, ByVal writers As List(Of IWriter))
        For Each writer As IWriter In writers
            writer.WriteTitle(str)
        Next
    End Sub

    Public Shared Sub WriteSystem(ByVal str As String, ByVal writers As List(Of IWriter))
        For Each writer As IWriter In writers
            writer.WriteSystem(str)
        Next
    End Sub

    Public Shared Sub WriteVersion(ByVal str As String, ByVal writers As List(Of IWriter))
        For Each writer As IWriter In writers
            writer.WriteVersion(str)
        Next
    End Sub

    Public Shared Sub WriteCategory(ByVal str As String, ByVal writers As List(Of IWriter))
        For Each writer As IWriter In writers
            writer.WriteCategory(str)
        Next
    End Sub

    Public Shared Sub WriteSection(ByVal str As String, ByVal writers As List(Of IWriter))
        For Each writer As IWriter In writers
            writer.WriteSection(str)
        Next
    End Sub

    Public Shared Sub WriteEntry(ByVal id As String, ByVal value As String, ByVal writers As List(Of IWriter))
        For Each writer As IWriter In writers
            writer.WriteEntry(id, value)
        Next
    End Sub

    Public Shared Sub WriteEntry(ByVal str As String, ByVal writers As List(Of IWriter))
        For Each writer As IWriter In writers
            writer.WriteEntry(str)
        Next
    End Sub

    Public Shared Sub WriteBlankEntry(ByVal writers As List(Of IWriter))
        For Each writer As IWriter In writers
            writer.WriteBlankEntry()
        Next
    End Sub

    Public Shared Sub WriteBlank(ByVal writers As List(Of IWriter))
        For Each writer As IWriter In writers
            writer.WriteBlank()
        Next
    End Sub

    Public Shared Sub WriteEntryError(ByVal str As String, ByVal writers As List(Of IWriter))
        For Each writer As IWriter In writers
            writer.WriteEntryError(str)
        Next
    End Sub

    Public Shared Sub WriteSectionError(ByVal str As String, ByVal writers As List(Of IWriter))
        For Each writer As IWriter In writers
            writer.WriteSectionError(str)
        Next
    End Sub

    Public Shared Sub WriteCategoryError(ByVal str As String, ByVal writers As List(Of IWriter))
        For Each writer As IWriter In writers
            writer.WriteCategoryError(str)
        Next
    End Sub

    Public Shared Sub WritePageBreak(ByVal writers As List(Of IWriter))
        For Each writer As IWriter In writers
            writer.WritePageBreak()
        Next
    End Sub

    Public Shared Sub WriteFooter(ByVal writers As List(Of IWriter))
        For Each writer As IWriter In writers
            writer.WriteFooter()
        Next
    End Sub

    Public Shared Sub Cleanup(ByVal writers As List(Of IWriter))
        For Each writer As IWriter In writers
            writer.Cleanup()
        Next
    End Sub

End Class
